// 判断手机号是否正确
export const validatePhnoeNubmer = (phone: string) => {
  const isEmpty = phone === "" || phone === null || phone === undefined;
  //判断手机号格式是否正确
  const regExp = /^1[3456789]\d{9}$/;
  return (regExp.test(phone)) && !isEmpty;
}

// 生成用户唯一UID
export function UUID(length: number){
  return Number(Math.random().toString().substring(3, length) + Date.now());
}

// 生成用户唯一UID -- 36进制
export function UUID36(length: number){
  return Number(Math.random().toString().substring(3, length) + Date.now()).toString(36);
}
